package com.pan.controller;


import com.pan.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/redis")
public class RedisController {

    @Autowired
    private RedisService redisService;


    @GetMapping("/getByKey")
    public String getByKey(String key){

        String value = redisService.getBykey(key);

        return value;
    }
}
